home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-19 | 6.2 KB | 253 lines | [TEXT/MPS ] |
- //# Copyright: © 1993-94 by Apple Computer, Inc., all rights reserved.
- #ifndef _STORAGEU_
- #define _STORAGEU_
-
- #ifndef _ODTYPES_
- #include "ODTypes.idl"
- #endif
-
- #ifndef _ODOBJECT_
- #include "ODObject.idl"
- #endif
-
- #ifndef _REFCTOBJ_
- #include "RefCtObj.idl"
- #endif
-
- //==============================================================================
- // Constants
- //==============================================================================
-
- const ODULong kODPosUndefined = 0xFFFFFFFF;
- const ODULong kODPosSame = 0x00;
- const ODULong kODPosAll = 1;
- const ODULong kODPosFirstSib = 2;
- const ODULong kODPosLastSib = 3;
- const ODULong kODPosNextSib = 4;
- const ODULong kODPosPrevSib = 5;
- const ODULong kODPosFirstBelow = 6;
- const ODULong kODPosLastBelow = 7;
- const ODULong kODPosFirstAbove = 8;
- const ODULong kODPosLastAbove = 9;
- const ODULong kODPosReserved11 = 10;
- const ODULong kODPosReserved12 = 11;
- const ODULong kODPosReserved13 = 12;
- const ODULong kODPosReserved14 = 13;
- const ODULong kODPosReserved15 = 14;
- const ODULong kODPosMWrap = 0x10;
- const ODULong kODPosMOtherTypes = 0x20;
-
-
- const ODID kODIDAll = 0;
- const ODID kODIndexAll = 0;
- const ODID kODIDWild = 0;
- const ODValueType kODTypeAll = kODNULL;
-
- //==============================================================================
- // Scalar Types
- //==============================================================================
-
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
- interface ODStorageUnit;
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
- interface ODDraft;
- interface ODSession;
- interface ODPart;
- interface ODStorageUnitCursor;
- interface ODStorageUnitView;
- interface ODStorageUnitRefIterator;
-
- //==============================================================================
- // ODStorageUnit
- //==============================================================================
-
- interface ODStorageUnit : ODRefCntObject
- {
- void InitStorageUnit(in ODDraft draft,
- in ODStorageUnitID suid);
-
- ODDraft GetDraft();
-
- ODSession GetSession();
-
- ODBoolean Exists(in ODPropertyName propertyName,
- in ODValueType valueType,
- in ODValueIndex valueIndex);
-
- ODBoolean ExistsWithCursor(in ODStorageUnitCursor cursor);
-
- ODULong CountProperties();
-
- ODULong CountValues();
-
- ODStorageUnit Focus(in ODPropertyName propertyName,
- in ODPositionCode propertyPosCode,
- in ODValueType valueType,
- in ODValueIndex valueIndex,
- in ODPositionCode valuePosCode);
-
- ODStorageUnit FocusWithCursor(in ODStorageUnitCursor cursor);
-
- ODStorageUnitCursor CreateCursor();
-
- ODStorageUnit Externalize();
-
- ODStorageUnit Internalize();
-
- ODID GetID();
-
- ODStorageUnitName GetName();
-
- void SetName(in ODStorageUnitName name);
-
- ODStorageUnit AddProperty(in ODPropertyName propertyName);
-
- ODStorageUnit AddValue(in ODValueType type);
-
- ODStorageUnit Remove();
-
- void CopyTo(in ODStorageUnit toSU);
-
- ODStorageUnit CloneTo(in ODDraftKey key,
- in ODDraft destDraft,
- in ODStorageUnit initiatingFrame);
-
- void CloneInto(in ODDraftKey key,
- in ODStorageUnit destStorageUnit,
- in ODStorageUnit initiatingFrame);
-
- ODStorageUnitView CreateView(in ODStorageUnitCursor cursor);
-
- ODPropertyName GetProperty();
-
- ODValueType GetType();
-
- void SetType(in ODValueType valueType);
-
- void SetOffset(in ODULong offset);
-
- ODULong GetOffset();
-
- ODULong GetValue(in ODULong length,
- in ODValue value);
-
- void SetValue(in ODULong length,
- in ODValue value);
-
- void InsertValue(in ODULong length,
- in ODValue value);
-
- void DeleteValue(in ODULong length);
-
- ODULong GetSize();
-
- ODBoolean IsValidStorageUnitRef(in ODStorageUnitRef aRef);
-
- ODStorageUnitRef GetStrongStorageUnitRef(in ODStorageUnit embeddedSU);
-
- ODStorageUnitRef GetWeakStorageUnitRef(in ODStorageUnit embeddedSU);
-
- ODBoolean IsStrongStorageUnitRef(in ODStorageUnitRef ref);
-
- ODBoolean IsWeakStorageUnitRef(in ODStorageUnitRef ref);
-
- ODStorageUnit RemoveStorageUnitRef(in ODStorageUnitRef aRef);
-
- ODStorageUnitID GetIDFromStorageUnitRef(in ODStorageUnitRef aRef);
-
- ODStorageUnitRefIterator GetStorageUnitRefIterator();
-
- ODULong GetGenerationNumber();
-
- ODULong IncrementGenerationNumber();
-
- ODBoolean IsPromiseValue();
-
- void SetPromiseValue(in ODValueType valueType,
- in ODULong offset,
- in ODULong length,
- in ODValue value,
- in ODPart sourcePart);
-
- ODULong GetPromiseValue(in ODValueType valueType,
- in ODULong offset,
- in ODULong length,
- in ODValue value,
- in ODPart sourcePart);
-
- void ClearAllPromises();
-
- ODStorageUnitKey Lock(in ODStorageUnitKey key);
-
- void Unlock(in ODStorageUnitKey key);
- #ifdef __SOMIDL__
- implementation
- {
- override:
- somInit,
- somUninit,
- IncrementRefCount,
- Release,
- Purge;
- releaseorder:
- InitStorageUnit,
- GetDraft,
- GetSession,
- Exists,
- ExistsWithCursor,
- CountProperties,
- CountValues,
- Focus,
- FocusWithCursor,
- CreateCursor,
- Externalize,
- Internalize,
- GetID,
- GetName,
- SetName,
- AddProperty,
- AddValue,
- Remove,
- CopyTo,
- CloneTo,
- CloneInto,
- CreateView,
- GetProperty,
- GetType,
- SetType,
- SetOffset,
- GetOffset,
- GetValue,
- SetValue,
- InsertValue,
- DeleteValue,
- GetSize,
- IsValidStorageUnitRef,
- GetStrongStorageUnitRef,
- GetWeakStorageUnitRef,
- IsStrongStorageUnitRef,
- IsWeakStorageUnitRef,
- RemoveStorageUnitRef,
- GetIDFromStorageUnitRef,
- GetStorageUnitRefIterator,
- GetGenerationNumber,
- IncrementGenerationNumber,
- IsPromiseValue,
- SetPromiseValue,
- GetPromiseValue,
- ClearAllPromises,
- Lock,
- Unlock;
- };
- #endif
- };
-
- #endif // _STORAGEU_
-
-